package net.xdclass.mq;

import lombok.extern.slf4j.Slf4j;
import net.xdclass.core.KeyValue;
import net.xdclass.redis.core.RedisMQTemplate;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;
import java.util.List;

@Slf4j
@Component
public class RedisMqSmsProducer {
    @Resource
    private RedisMQTemplate redisMQTemplate;

    public void sendSmsSendMessage(Long logId, String mobile, Long channelId, String apiTemplateId, List<KeyValue<String,Object>> templateParams){
        RedisMqSmsSendMessage message = new RedisMqSmsSendMessage().setLogId(logId).setMobile(mobile).setChannelId(channelId).setApiTemplateId(apiTemplateId).setTemplateParams(templateParams);
        redisMQTemplate.send(message);
    }
}
